using UnityEngine;

public class SoundManager : BehaviourSingleton<SoundManager>
{
	public int maxHumanReadable
	{
		get
		{
			return 100;
		}
	}

	public void SetMusicVolume(float humanReadableVal)
	{
		float num = Mathf.Clamp(humanReadableVal, 0f, maxHumanReadable);
		float num2 = (float)ConfigBase.instance.minAudioVal + (float)(ConfigBase.instance.maxAudioVal - ConfigBase.instance.minAudioVal) * (Mathf.Exp(num / (float)maxHumanReadable) - 1f) / (Mathf.Exp(1f) - 1f);
		Debug.Log("actualMusicVol: " + num2);
		ConfigBase.instance.masterMixer.SetFloat("musicVol", num2);
	}

	public void SetSfxVolume(float humanReadableVal)
	{
		float num = Mathf.Clamp(humanReadableVal, 0f, maxHumanReadable);
		float num2 = (float)ConfigBase.instance.minAudioVal + (float)(ConfigBase.instance.maxAudioVal - ConfigBase.instance.minAudioVal) * (Mathf.Exp(num / (float)maxHumanReadable) - 1f) / (Mathf.Exp(1f) - 1f);
		Debug.Log("actualSfxVol: " + num2);
		ConfigBase.instance.masterMixer.SetFloat("sfxVol", num2);
	}
}
